function getSum(a: number, b: number): number {
    return a + b
}

console.log(getSum(10, 20))


function saiHai(message: string): void {
    console.log(message)
    // 如果函数的返回值是void类型也可以直接返回undefined
    return undefined
}

saiHai('你好')


type FooType = () => void

/*
const foo: () => void = (): void => {
    console.log(1)
}
*/

const foo: FooType = (): void => {
    console.log(1)
}
foo()
